function $dom(id){
	return document.getElementById(id);	
}

function searchInfo(type){
	if(type == '1')
		go('stage/searchHospital.action?keyword='+($dom("hosKeyWord"+type).value=="请输入您想要搜索的内容"?"":$dom("hosKeyWord"+type).value));
	if(type == '2')
		go('stage/searchDept.action?keyword='+($dom("hosKeyWord"+type).value=="请输入您想要搜索的内容"?"":$dom("hosKeyWord"+type).value));
	if(type == '3')
		go('stage/searchGroup.action?keyword='+($dom("hosKeyWord"+type).value=="请输入您想要搜索的内容"?"":$dom("hosKeyWord"+type).value));
	if(type == '4')
		go('stage/searchDoctor.action?keyword='+($dom("hosKeyWord"+type).value=="请输入您想要搜索的内容"?"":$dom("hosKeyWord"+type).value));
}

function searchStateCheck_f(obj){
	if(obj.value=="请输入您想要搜索的内容"){
		obj.value = "";	
	}
}

function searchStateCheck_b(obj){
	if(obj.value==""){
		obj.value = "请输入您想要搜索的内容";	
	}
}

$(function(){
	$("#hosKeyWord1").bigAutocomplete({url:'stage/searchSuggest.action?type=1',callback:function(data){
	}});
	$("#hosKeyWord2").bigAutocomplete({url:'stage/searchSuggest.action?type=2',callback:function(data){
	}});
	$("#hosKeyWord3").bigAutocomplete({url:'stage/searchSuggest.action?type=3',callback:function(data){
	}});
	$("#hosKeyWord4").bigAutocomplete({url:'stage/searchSuggest.action?type=4',callback:function(data){
	}});
              
           
})

